package day03;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Scanner;

public class OperDemo4 {
    public static void main(String[] args) {

        char a = 'a';
        a += 6;//等价于a=(char)(a+6);自带强转功能
        System.out.println(a);
//        a = a + 6;//int到char大到小需要强转
        a = (char) (a + 6);
        System.out.println((int) a);

        System.out.println(25 * 2 + 10 == 30 * 2);
        //买菜
        System.out.println("plan1:"+(24+8+3)*0.8);

        System.out.println("plan2:"+(16+8+3));

        //输出三个数中的最大值
        Scanner sc = new Scanner(System.in);
        int j = sc.nextInt();
        int k = sc.nextInt();
        int l = sc.nextInt();
        //嵌套 if做法
//        if(j>=k){
//            if(j>l){
//                System.out.println(j);
//            }
//            else {
//                System.out.println(l);
//            }
//        }
//        else if (k>=l) {
//            System.out.println(k);
//        }
//        else {
//            System.out.println(l);
//        }

        //三目运算符嵌套求得最大值
        System.out.println(j > k ? j > l ? j : l : k > l ? k : l);
    }

}
